import mongoose from "mongoose";

const schema = new mongoose.Schema({
    title: {
        type: String,
        required: true,
    },
    typeId: {
        type: String,
        required: true,
    },
    content: String,
    userId: {
        type:String,
        required: true,
    },
    // page View
    pv: {
        type: Number,
        default: 0,
    },
},{
    timestamps: true
})

export const articleModel = mongoose.model('articles', schema)